package com.game.ammo {
	import com.game.units.Enemy;
	import com.game.utils.TowerType;
	import flash.filters.BlurFilter;
	import flash.geom.Matrix;
	public class Wave extends Ammo {
		private var position:Number = 0;
		public function Wave(bulX:Number, bulY:Number, ang:Number, destination:Number, type:TowerType, upgrades:int, suggestiveDistance:int) {
			super(bulX, bulY, ang, destination, type, upgrades, suggestiveDistance);
		}
		override public function isHit(p3:Enemy):Boolean {
			if (pointInsideCircleDistance(p3) < (position + p3.size / 2) * (position + p3.size / 2)) {
				return true;
			}
			return false;
		}
		override protected function initialSet():void {
			ammoSpeed = 3;
			_damage = (upgrades + 1) * 2;
			//
			_rect.width = 200;
			_rect.height = 200;
			_point.x = x - 100;
			_point.y = y - 100;
			//
		}
		override public function move():void {
			position += this.ammoSpeed;
			if (position > destination) {
				readyForRemoval = true;
			}
			_rect.x = int(10 * position / destination) * 200;
		}
	}
}